<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!--    <meta name="_csrf" th:content="${_csrf.token}"/>-->
    <!--    <meta name="_csrf_header" th:content="${_csrf.headerName}"/>-->
    <title>注册</title>
    <script th:src="@{../js/jquery-3.5.1.min.js}"></script>
    <script th:src="@{../bootstrap-4.4.1-dist/js/bootstrap.bundle.min.js}"></script>
    <link rel="stylesheet" th:href="@{../bootstrap-4.4.1-dist/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{../css/signin.css}">
    <link rel="stylesheet" th:href="@{../css/common.css}">
</head>
<body>
<div th:include="navigate::navbar"></div>
<div class="container">
    <form id="register_form" class="form-signin" method="post" style="max-width: 420px;align-content: center"
          onsubmit="return false" novalidate>
        <h2 class="form-signin-heading">注册</h2>
        <div class="form-group">
            <label for="username" class="sr-only">用户名</label>
            <input type="text" id="username" name="username" class="form-control"
                   placeholder="用户名长度不少于5位"
                   required autofocus>
            <div id="valid_username"></div>
        </div>
        <div class="form-group">
            <label for="password" class="sr-only">密码</label>
            <input type="password" id="password" name="password" class="form-control"
                   placeholder="密码" required>
            <div id="valid_password"></div>
        </div>
        <div class="form-group">
            <label for="recheck" class="sr-only">确认密码</label>
            <input type="password" id="recheck" name="recheck" class="form-control"
                   placeholder="再次输入密码" required>
            <div id="valid_recheck"></div>
        </div>
        <div class="form-group">
            <label for="validateCode" class="sr-only" hidden>验证码</label>
            <input type="password" id="validateCode" name="validateCode" class="form-control" placeholder="验证码"
                   required>
            <img id="codeImg" src="/vCode/image" alt="点击切换图片">
        </div>
        <div id="register_result">
            <!--提交后返回的结果-->
        </div>
        <button id="submitBtn" class="btn btn-lg btn-primary btn-block" type="submit">注册</button>
    </form>
    <div id="userInfo" th:include="navigate::info"></div>
</div>
<script th:src="@{../js/register_page.js}"></script>
</body>
</html>